<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="theme-color" content="#33474d">
	<title>Python 元组 | 失落的乐章</title>
	<link rel="stylesheet" href="/css/style.css" />
	
      <link rel="alternate" href="/atom.xml" title="失落的乐章" type="application/atom+xml">
    
</head>

<body>

	<header class="header">
		<nav class="header__nav">
			
				<a href="/archives" class="header__link">Archive</a>
			
				<a href="/tags" class="header__link">Tags</a>
			
				<a href="/atom.xml" class="header__link">RSS</a>
			
		</nav>
		<h1 class="header__title"><a href="/">失落的乐章</a></h1>
		<h2 class="header__subtitle">技术面前，永远都是学生。</h2>
	</header>

	<main>
		<article>
	
		<h1>Python 元组</h1>
	
	<div class="article__infos">
		<span class="article__date">2017-10-12</span><br />
		
		
			<span class="article__tags">
			  	<a class="article__tag-link" href="/tags/Python/">Python</a>
			</span>
		
	</div>

	

	
		<h1 id="Python-元组"><a href="#Python-元组" class="headerlink" title="Python 元组"></a>Python 元组</h1><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;元组是序列的一种。序列包括字符串、列表和元组。</p>
<h2 id="序列说明"><a href="#序列说明" class="headerlink" title="序列说明"></a>序列说明</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;序列的两个主要特点是索引操作符和切片操作符</p>
<ul>
<li>索引操作符让我们可以从序列中抓取一个特定项目</li>
<li>切片操作符让我们能够获取序列的一个切片，即一部分序列。</li>
</ul>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;序列的基本操作</p>
<ul>
<li>len()：求序列的长度</li>
</ul>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">In [<span class="number">1</span>]: a = <span class="string">'abc'</span></div><div class="line"></div><div class="line">In [<span class="number">2</span>]: len(a)</div><div class="line">Out[<span class="number">2</span>]: <span class="number">3</span></div></pre></td></tr></table></figure>
<ul>
<li>+：连接2个序列</li>
</ul>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">In [<span class="number">3</span>]: a + <span class="string">'d'</span></div><div class="line">Out[<span class="number">3</span>]: <span class="string">'abcd'</span></div></pre></td></tr></table></figure>
<ul>
<li>*：重复序列元素</li>
</ul>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">In [<span class="number">4</span>]: a</div><div class="line">Out[<span class="number">4</span>]: <span class="string">'abc'</span></div><div class="line"></div><div class="line">In [<span class="number">5</span>]: a * <span class="number">4</span></div><div class="line">Out[<span class="number">5</span>]: <span class="string">'abcabcabcabc'</span></div><div class="line"></div><div class="line">In [<span class="number">8</span>]: <span class="string">'@'</span> * <span class="number">10</span></div><div class="line">Out[<span class="number">8</span>]: <span class="string">'@@@@@@@@@@'</span></div></pre></td></tr></table></figure>
<ul>
<li>in 或 not in：判断元素是否存在序列中</li>
</ul>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line">In [<span class="number">9</span>]: <span class="string">'a'</span> <span class="keyword">in</span> a</div><div class="line">Out[<span class="number">9</span>]: <span class="keyword">True</span></div><div class="line"></div><div class="line">In [<span class="number">10</span>]: a</div><div class="line">Out[<span class="number">10</span>]: <span class="string">'abc'</span></div><div class="line"></div><div class="line">In [<span class="number">11</span>]: <span class="string">'d'</span> <span class="keyword">in</span> a</div><div class="line">Out[<span class="number">11</span>]: <span class="keyword">False</span></div><div class="line"></div><div class="line">In [<span class="number">12</span>]: <span class="string">'d'</span> <span class="keyword">not</span> <span class="keyword">in</span> a</div><div class="line">Out[<span class="number">12</span>]: <span class="keyword">True</span></div></pre></td></tr></table></figure>
<ul>
<li>max()：返回最大值</li>
</ul>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">In [<span class="number">13</span>]: max(a)</div><div class="line">Out[<span class="number">13</span>]: <span class="string">'c'</span></div></pre></td></tr></table></figure>
<ul>
<li>min()：返回最小值</li>
</ul>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">In [<span class="number">14</span>]: min(a)</div><div class="line">Out[<span class="number">14</span>]: <span class="string">'a'</span></div></pre></td></tr></table></figure>
<ul>
<li>cmp(x,y)：比较两个个序列是否相等</li>
</ul>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div></pre></td><td class="code"><pre><div class="line">In [<span class="number">15</span>]: a</div><div class="line">Out[<span class="number">15</span>]: <span class="string">'abc'</span></div><div class="line"></div><div class="line">In [<span class="number">16</span>]: cmp(a,<span class="string">'abc'</span>)</div><div class="line">Out[<span class="number">16</span>]: <span class="number">0</span></div><div class="line"></div><div class="line">In [<span class="number">17</span>]: cmp(a,<span class="string">'abcd'</span>)</div><div class="line">Out[<span class="number">17</span>]: <span class="number">-1</span></div><div class="line"></div><div class="line">In [<span class="number">18</span>]: cmp(a,<span class="string">'ab'</span>)</div><div class="line">Out[<span class="number">18</span>]: <span class="number">1</span></div><div class="line"></div><div class="line">In [<span class="number">19</span>]: cmp(a+<span class="string">'g'</span>,<span class="string">'abcdef'</span>)</div><div class="line">Out[<span class="number">19</span>]: <span class="number">1</span></div></pre></td></tr></table></figure>
<h2 id="元组"><a href="#元组" class="headerlink" title="元组"></a>元组</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Python 的元组与列表十分相似，不同之处在于元组的元素不能修改。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;元组和字符串一样是不可变的</p>
<ul>
<li>元组可以存储一系列的值</li>
<li>元组通常用在用户定义的函数能够安全地采用一组值的时候，即被使用的元组的值不回改变</li>
</ul>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;元组使用小括号，列表使用方括号。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;元组创建很简单，只需要在括号中添加元素，并使用逗号隔开即可。</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div></pre></td><td class="code"><pre><div class="line">In [<span class="number">21</span>]: tup1 = (<span class="string">'python'</span>,<span class="string">'a'</span>,<span class="number">1997</span>,<span class="number">2017</span>);</div><div class="line"></div><div class="line">In [<span class="number">22</span>]: type(tup1)</div><div class="line">Out[<span class="number">22</span>]: tuple</div><div class="line"></div><div class="line">In [<span class="number">23</span>]: tup2 = (<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>,<span class="number">4</span>,(<span class="number">5</span>,))</div><div class="line"></div><div class="line">In [<span class="number">24</span>]: type(tup2)</div><div class="line">Out[<span class="number">24</span>]: tuple</div><div class="line"></div><div class="line">In [<span class="number">25</span>]: tup3 = <span class="string">"a"</span>,<span class="string">"b"</span>,<span class="string">"c"</span>,<span class="string">"d"</span>;</div><div class="line"></div><div class="line">In [<span class="number">26</span>]: type(tup3)</div><div class="line">Out[<span class="number">26</span>]: tuple</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;创建空元组</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">In [<span class="number">27</span>]: tup1 = ();</div><div class="line"></div><div class="line">In [<span class="number">28</span>]: type(tup1)</div><div class="line">Out[<span class="number">28</span>]: tuple</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;元组中只包含一个元素时，需要在元素后面添加逗号</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">In [<span class="number">29</span>]: tup1 = (<span class="number">50</span>,);</div><div class="line"></div><div class="line">In [<span class="number">30</span>]: type(tup1)</div><div class="line">Out[<span class="number">30</span>]: tuple</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;元组与字符串类似，下标索引从0开始，可以进行截取，组合等。</p>
<h2 id="访问元组"><a href="#访问元组" class="headerlink" title="访问元组"></a>访问元组</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;元组可以使用下标索引来访问元组中的值</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line"><span class="comment">#!/usr/bin/python</span></div><div class="line"></div><div class="line">tup1 = (<span class="string">'physics'</span>, <span class="string">'chemistry'</span>, <span class="number">1997</span>, <span class="number">2000</span>);</div><div class="line">tup2 = (<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span> );</div><div class="line"></div><div class="line"><span class="keyword">print</span> <span class="string">"tup1[0]: "</span>, tup1[<span class="number">0</span>]</div><div class="line"><span class="keyword">print</span> <span class="string">"tup2[1:5]: "</span>, tup2[<span class="number">1</span>:<span class="number">5</span>]</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;输出结果</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">tup1[<span class="number">0</span>]:  physics</div><div class="line">tup2[<span class="number">1</span>:<span class="number">5</span>]:  (<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>)</div></pre></td></tr></table></figure>
<h2 id="修改元组"><a href="#修改元组" class="headerlink" title="修改元组"></a>修改元组</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;元组的元素值是不允许修改的，但可以对元组进行连接组合</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div></pre></td><td class="code"><pre><div class="line"><span class="comment">#!/usr/bin/python</span></div><div class="line"><span class="comment"># -*- coding: UTF-8 -*-</span></div><div class="line"></div><div class="line">tup1 = (<span class="number">12</span>, <span class="number">34.56</span>);</div><div class="line">tup2 = (<span class="string">'abc'</span>, <span class="string">'xyz'</span>);</div><div class="line"></div><div class="line"><span class="comment"># 以下修改元组元素操作是非法的。</span></div><div class="line"><span class="comment"># tup1[0] = 100;</span></div><div class="line"></div><div class="line"><span class="comment"># 创建一个新的元组</span></div><div class="line">tup3 = tup1 + tup2;</div><div class="line"><span class="keyword">print</span> tup3;</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;输出结果</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">(<span class="number">12</span>,<span class="number">34</span>,<span class="number">56</span>,<span class="string">'abc'</span>,<span class="string">'xyz'</span>)</div></pre></td></tr></table></figure>
<h2 id="删除元组"><a href="#删除元组" class="headerlink" title="删除元组"></a>删除元组</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;元组中的元素值是不允许删除的，但可以使用 del 语句来删除整个元组</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line"><span class="comment">#!/usr/bin/python</span></div><div class="line"></div><div class="line">tup = (<span class="string">'physics'</span>, <span class="string">'chemistry'</span>, <span class="number">1997</span>, <span class="number">2000</span>);</div><div class="line"></div><div class="line"><span class="keyword">print</span> tup;</div><div class="line"><span class="keyword">del</span> tup;</div><div class="line"><span class="keyword">print</span> <span class="string">"After deleting tup : "</span></div><div class="line"><span class="keyword">print</span> tup;</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;以上实例元组被删除后，输出变量会有异常信息，输出如下所示：</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">(<span class="string">'physics'</span>, <span class="string">'chemistry'</span>, <span class="number">1997</span>, <span class="number">2000</span>)</div><div class="line">After deleting tup :</div><div class="line">Traceback (most recent call last):</div><div class="line">  File <span class="string">"test.py"</span>, line <span class="number">9</span>, <span class="keyword">in</span> &lt;module&gt;</div><div class="line">    <span class="keyword">print</span> tup;</div><div class="line">NameError: name <span class="string">'tup'</span> <span class="keyword">is</span> <span class="keyword">not</span> defined</div></pre></td></tr></table></figure>
<h2 id="元组运算符"><a href="#元组运算符" class="headerlink" title="元组运算符"></a>元组运算符</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;与字符串一样，元组之间可以使用 + 号和 <em> 号进行元算。这就意味着它们可以组合和复制，运算后会生成一个新的元组。<br>python表达式|结果|描述<br>—|—|—<br>len((1,2,3))|3|计算元素个数<br>（1，2，3） + （4，5，6）|（1，2，3，4，5，6）|连接<br>(‘Hi!’) </em> 4|(‘Hi!’,’Hi!’,’Hi!’,’Hi!’)|复制<br>3 in (1,2,3)|true|元素是否存在<br>for x in (1,2,3):print x,|1 2 3 |迭代</p>
<h2 id="元组索引、截取"><a href="#元组索引、截取" class="headerlink" title="元组索引、截取"></a>元组索引、截取</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;因为元组也是一个序列，所以可以访问元组中的指定位置的元素，也可以截取索引中的一段元素</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">L = (<span class="string">'spam'</span>,<span class="string">'Spam'</span>,<span class="string">'SPAM!'</span>)</div></pre></td></tr></table></figure>
<table>
<thead>
<tr>
<th>python表达式</th>
<th>结果</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>L[2]</td>
<td>‘SPANM!’</td>
<td>读取第三个元素</td>
</tr>
<tr>
<td>L[-2]</td>
<td>‘Spam’</td>
<td>反向读取；读取倒数第二个元素</td>
</tr>
<tr>
<td>L[1:]</td>
<td>(‘Spam’,’SPAM!’)</td>
<td>截取元素</td>
</tr>
</tbody>
</table>
<h2 id="无关闭分隔符"><a href="#无关闭分隔符" class="headerlink" title="无关闭分隔符"></a>无关闭分隔符</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;任意无符号的对象，以逗号隔开，默认为元组</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="comment">#!/usr/bin/python</span></div><div class="line"></div><div class="line"><span class="keyword">print</span> <span class="string">'abc'</span>, <span class="number">-4.24e93</span>, <span class="number">18</span>+<span class="number">6.6j</span>, <span class="string">'xyz'</span>;</div><div class="line">x, y = <span class="number">1</span>, <span class="number">2</span>;</div><div class="line"><span class="keyword">print</span> <span class="string">"Value of x , y : "</span>, x,y;</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;以上实例运行结果：</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">abc <span class="number">-4.24e+93</span> (<span class="number">18</span>+<span class="number">6.6j</span>) xyz</div><div class="line">Value of x , y : <span class="number">1</span> <span class="number">2</span></div></pre></td></tr></table></figure>
<h2 id="元组内置函数"><a href="#元组内置函数" class="headerlink" title="元组内置函数"></a>元组内置函数</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;python元组包含了以下内置函数</p>
<table>
<thead>
<tr>
<th>序号</th>
<th>方法及描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><a href="https://github.com/hcldirgit/studygit/blob/master/%E5%85%83%E7%BB%84%E5%86%85%E7%BD%AE%E5%87%BD%E6%95%B0/1.%20Python%20Tuple(%E5%85%83%E7%BB%84" target="_blank" rel="external">cmp(tuple1, tuple2)</a>%20cmp()%E6%96%B9%E6%B3%95.md)，比较两个元组元素。</td>
</tr>
<tr>
<td>2</td>
<td><a href="https://github.com/hcldirgit/studygit/blob/master/%E5%85%83%E7%BB%84%E5%86%85%E7%BD%AE%E5%87%BD%E6%95%B0/2.%20Python%20Tuple(%E5%85%83%E7%BB%84" target="_blank" rel="external">len(tuple)</a>%20len()%E6%96%B9%E6%B3%95.md)，计算元组元素个数。</td>
</tr>
<tr>
<td>3</td>
<td><a href="https://github.com/hcldirgit/studygit/blob/master/%E5%85%83%E7%BB%84%E5%86%85%E7%BD%AE%E5%87%BD%E6%95%B0/3.%20Python%20Tuple(%E5%85%83%E7%BB%84" target="_blank" rel="external">max(tuple)</a>%20max()%E6%96%B9%E6%B3%95.md)，返回元组中元素最大值。</td>
</tr>
<tr>
<td>4</td>
<td><a href="https://github.com/hcldirgit/studygit/blob/master/%E5%85%83%E7%BB%84%E5%86%85%E7%BD%AE%E5%87%BD%E6%95%B0/4.%20Python%20Tuple(%E5%85%83%E7%BB%84" target="_blank" rel="external">min(tuple)</a>%20min()%E6%96%B9%E6%B3%95.md)，返回元组中元素最小值。</td>
</tr>
<tr>
<td>5</td>
<td><a href="https://github.com/hcldirgit/studygit/blob/master/%E5%85%83%E7%BB%84%E5%86%85%E7%BD%AE%E5%87%BD%E6%95%B0/5.%20Python%20Tuple(%E5%85%83%E7%BB%84" target="_blank" rel="external">tuple(seq)</a>%20tuple()%E6%96%B9%E6%B3%95.md)，将列表转换为元组。</td>
</tr>
</tbody>
</table>
<h2 id="元组的拆分"><a href="#元组的拆分" class="headerlink" title="元组的拆分"></a>元组的拆分</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;可以通过变量去接收元组的值,通常叫做元组的拆分</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div></pre></td><td class="code"><pre><div class="line">In [<span class="number">31</span>]: tup1 = (a,<span class="string">'b'</span>,<span class="string">'c'</span>)</div><div class="line"></div><div class="line">In [<span class="number">32</span>]: tup1</div><div class="line">Out[<span class="number">32</span>]: (<span class="string">'abc'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>)</div><div class="line"></div><div class="line">In [<span class="number">33</span>]: first,second,third = tup1</div><div class="line"></div><div class="line">In [<span class="number">34</span>]: first</div><div class="line">Out[<span class="number">34</span>]: <span class="string">'abc'</span></div><div class="line"></div><div class="line">In [<span class="number">35</span>]: second</div><div class="line">Out[<span class="number">35</span>]: <span class="string">'b'</span></div><div class="line"></div><div class="line">In [<span class="number">36</span>]: third</div><div class="line">Out[<span class="number">36</span>]: <span class="string">'c'</span></div></pre></td></tr></table></figure>

	

	
		<span class="different-posts"><a href="/2017/10/12/Python/1. Python 基础篇/1. Python 基础语法/1.6 元组/8. Python 元组/" onclick="window.history.go(-1); return false;">⬅️ Go back </a></span>

	

</article>

	</main>

	<footer class="footer">
	<div class="footer-content">
		
	      <div class="footer__element">
	<p>Hi there, <br />welcome to my Blog glad you found it. Have a look around, will you?</p>
</div>

	    
	      <div class="footer__element">
	<h5>Check out</h5>
	<ul class="footer-links">
		<li class="footer-links__link"><a href="/archives">Archive</a></li>
		
		  <li class="footer-links__link"><a href="/atom.xml">RSS</a></li>
	    
		<li class="footer-links__link"><a href="/about">about page</a></li>
		<li class="footer-links__link"><a href="/tags">Tags</a></li>
		<li class="footer-links__link"><a href="/categories">Categories</a></li>
	</ul>
</div>

	    

		<div class="footer-credit">
			<span>© 2017 失落的乐章 | Powered by <a href="https://hexo.io/">Hexo</a> | Theme <a href="https://github.com/HoverBaum/meilidu-hexo">MeiliDu</a></span>
		</div>

	</div>


</footer>



</body>

</html>
